/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80017
 Source Host           : localhost:3306
 Source Schema         : poker

 Target Server Type    : MySQL
 Target Server Version : 80017
 File Encoding         : 65001

 Date: 13/06/2020 12:20:15
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for p_action_log
-- ----------------------------
DROP TABLE IF EXISTS `p_action_log`;
CREATE TABLE `p_action_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '执行用户id',
  `action_ip` bigint(20) NOT NULL COMMENT '执行行为者ip',
  `log` longtext NOT NULL COMMENT '日志备注',
  `log_url` varchar(255) NOT NULL COMMENT '执行的URL',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '执行行为的时间',
  `username` varchar(255) NOT NULL COMMENT '执行者',
  `title` varchar(255) NOT NULL COMMENT '标题',
  PRIMARY KEY (`id`),
  KEY `id` (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='行为日志表';

-- ----------------------------
-- Table structure for p_admin
-- ----------------------------
DROP TABLE IF EXISTS `p_admin`;
CREATE TABLE `p_admin` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `login_user` varchar(16) NOT NULL COMMENT '登录账号',
  `login_pass` varchar(32) NOT NULL COMMENT '登录密码',
  `username` varchar(16) NOT NULL COMMENT '用户名称',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态 0-正常 1-冻结',
  `user_email` varchar(32) DEFAULT NULL COMMENT '用户邮箱',
  `last_login_ip` varchar(16) DEFAULT NULL COMMENT '最后一次登录ip',
  `last_login_time` int(16) DEFAULT NULL COMMENT '最后一次登录时间',
  `create_time` int(16) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`,`login_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='管理员表';

-- ----------------------------
-- Table structure for p_auth_access
-- ----------------------------
DROP TABLE IF EXISTS `p_auth_access`;
CREATE TABLE `p_auth_access` (
  `role_id` mediumint(8) unsigned NOT NULL COMMENT '角色',
  `rule_name` varchar(255) NOT NULL COMMENT '规则唯一英文标识,全小写',
  `type` varchar(30) DEFAULT NULL COMMENT '权限规则分类，请加应用前缀,如admin_',
  `menu_id` int(11) DEFAULT NULL COMMENT '后台菜单ID',
  KEY `role_id` (`role_id`),
  KEY `rule_name` (`rule_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限授权表';

-- ----------------------------
-- Table structure for p_auth_role
-- ----------------------------
DROP TABLE IF EXISTS `p_auth_role`;
CREATE TABLE `p_auth_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL COMMENT '角色名称',
  `pid` smallint(6) DEFAULT '0' COMMENT '父角色ID',
  `status` tinyint(1) unsigned DEFAULT NULL COMMENT '状态',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `listorder` int(3) NOT NULL DEFAULT '0' COMMENT '排序字段',
  PRIMARY KEY (`id`),
  KEY `parentId` (`pid`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='角色表';

-- ----------------------------
-- Records of p_auth_role
-- ----------------------------
BEGIN;
INSERT INTO `p_auth_role` VALUES (1, '超级管理员', 0, 1, '拥有网站最高管理员权限！', 1329633709, 1329633709, 0);
INSERT INTO `p_auth_role` VALUES (2, '客服管理', 0, 1, '', 0, 1584772116, 0);
COMMIT;

-- ----------------------------
-- Table structure for p_auth_role_user
-- ----------------------------
DROP TABLE IF EXISTS `p_auth_role_user`;
CREATE TABLE `p_auth_role_user` (
  `role_id` int(11) unsigned DEFAULT '0' COMMENT '角色 id',
  `user_id` int(11) DEFAULT '0' COMMENT '用户id',
  KEY `group_id` (`role_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户角色对应表';

-- ----------------------------
-- Records of p_auth_role_user
-- ----------------------------
BEGIN;
INSERT INTO `p_auth_role_user` VALUES (2, 22);
COMMIT;

-- ----------------------------
-- Table structure for p_config
-- ----------------------------
DROP TABLE IF EXISTS `p_config`;
CREATE TABLE `p_config` (
  `id` int(8) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(50) NOT NULL COMMENT '配置名称',
  `value` text NOT NULL COMMENT '变量',
  `inc_type` varchar(64) DEFAULT NULL COMMENT '类型',
  `desc` varchar(16) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`,`name`) USING BTREE,
  KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='配置表';

-- ----------------------------
-- Records of p_config
-- ----------------------------
BEGIN;
INSERT INTO `p_config` VALUES (1, 'create_table_amount', '3', 'create', '创建牌桌消费砖石');
COMMIT;

-- ----------------------------
-- Table structure for p_menu
-- ----------------------------
DROP TABLE IF EXISTS `p_menu`;
CREATE TABLE `p_menu` (
  `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `parent_id` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
  `app` char(20) NOT NULL COMMENT '应用名称app',
  `model` char(20) NOT NULL COMMENT '控制器',
  `action` char(20) NOT NULL COMMENT '操作名称',
  `url_param` char(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'url参数',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '菜单类型  1：权限认证+菜单；0：只作为菜单',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态，1显示，0不显示',
  `name` varchar(50) NOT NULL COMMENT '菜单名称',
  `icon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单图标',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `list_order` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '排序ID',
  `rule_param` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '验证规则',
  `nav_id` int(11) DEFAULT '0' COMMENT 'nav ID ',
  `request` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '请求方式（日志生成）',
  `log_rule` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '日志规则',
  PRIMARY KEY (`id`),
  KEY `status` (`status`),
  KEY `model` (`model`),
  KEY `parent_id` (`parent_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='后台菜单表';

-- ----------------------------
-- Records of p_menu
-- ----------------------------
BEGIN;
INSERT INTO `p_menu` VALUES (1, 0, 'publics', 'index', 'index', '', 1, 1, '全部系统', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (2, 1, 'publics', 'auth', 'default', '', 1, 1, '权限管理', 'layui-icon-component', '', 998, '', 0, '', '');
INSERT INTO `p_menu` VALUES (3, 2, 'publics', 'auth', 'role', '', 1, 1, '角色管理', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (4, 3, 'publics', 'auth', 'roleAdd', '', 1, 0, '角色增加', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (5, 3, 'publics', 'auth', 'roleEdit', '', 1, 0, '角色编辑', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (6, 3, 'publics', 'auth', 'roleDelete', '', 0, 0, '角色删除', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (7, 3, 'publics', 'auth', 'authorize', '', 0, 0, '权限设置', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (8, 1, 'publics', 'auth', 'default', '', 1, 1, '菜单管理', 'layui-icon-cols', '', 999, '', 0, '', '');
INSERT INTO `p_menu` VALUES (9, 8, 'publics', 'auth', 'menu', '', 1, 1, '菜单列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (10, 9, 'publics', 'auth', 'menuAdd', '', 1, 0, '菜单增加', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (11, 9, 'publics', 'auth', 'menuEdit', '', 0, 0, '菜单修改', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (12, 9, 'publics', 'auth', 'menuDelete', '', 1, 0, '菜单删除', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (13, 9, 'publics', 'auth', 'menuOrder', '', 1, 0, '菜单排序', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (14, 2, 'publics', 'admin', 'index', '', 1, 1, '管理员管理', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (15, 1, 'publics', 'system', 'general', '', 1, 1, '系统管理', 'layui-icon-home', '', 1, '', 0, '', '');
INSERT INTO `p_menu` VALUES (19, 1, 'publics', 'index', 'home', '', 1, 0, '系统主页', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (21, 14, 'publics', 'admin', 'add', '', 0, 0, '用户添加', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (22, 14, 'publics', 'admin', 'edit', '', 1, 0, '用户编辑', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (23, 14, 'publics', 'admin', 'status', '', 1, 0, '用户状态', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (24, 14, 'publics', 'admin', 'deleted', '', 1, 0, '用户删除', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (25, 14, 'publics', 'auth', 'adminAuthorize', '', 0, 0, '查看权限', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (26, 14, 'publics', 'admin', 'update_pass', '', 1, 0, '密码修改', '', '', 0, '', 0, 'POST', '');
INSERT INTO `p_menu` VALUES (27, 15, 'publics', 'system', 'general', '', 1, 1, '系统设置', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (28, 1, 'publics', 'user', 'index', '', 1, 1, '会员管理', 'layui-icon-user', '', 2, '', 0, '', '');
INSERT INTO `p_menu` VALUES (29, 28, 'publics', 'user', 'index', '', 1, 1, '会员列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (52, 51, 'publics', 'finance', 'borrowing', '', 1, 1, '借款列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (51, 1, 'publics', 'finance', 'index', '', 1, 1, '资金管理', 'layui-icon-rmb', '', 3, '', 0, '', '');
INSERT INTO `p_menu` VALUES (33, 15, 'publics', 'system', 'log', '', 0, 1, '管理员日志', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (34, 33, 'publics', 'system', 'clearlog', '', 0, 0, '清空日志', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (58, 27, 'publics', 'system', 'sms_api', '', 1, 0, '接口设置', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (57, 27, 'publics', 'system', 'the_loan', '', 0, 0, '贷款设置', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (56, 55, 'publics', 'contract', 'index', '', 1, 1, '合同列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (55, 1, 'publics', 'contract', 'index', '', 1, 1, '合同管理', 'layui-icon-read', '', 4, '', 0, '', '');
INSERT INTO `p_menu` VALUES (54, 51, 'publics', 'finance', 'alow', '', 1, 0, '还款列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (53, 51, 'publics', 'finance', 'withdrawal', '', 1, 0, '提现列表', '', '', 0, '', 0, '', '');
INSERT INTO `p_menu` VALUES (50, 27, 'publics', 'system', 'general', '', 0, 0, '常规设置', '', '', 0, '', 0, '', '');
COMMIT;

-- ----------------------------
-- Table structure for p_user
-- ----------------------------
DROP TABLE IF EXISTS `p_user`;
CREATE TABLE `p_user` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '用户自增id',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id 6位随机数',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号(登录账号)',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录密码 md5(明文+创建时间)',
  `type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '账号类型 0-普通账号 1-透视 2-好牌 3-全部功能',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '账号状态 0-正常 1-冻结',
  `username` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称',
  `headimg` tinyint(4) NOT NULL DEFAULT '1' COMMENT '头像id',
  `balance` int(9) NOT NULL DEFAULT '0' COMMENT '砖石个数',
  `register_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '无' COMMENT '注册ip',
  `last_login_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '无' COMMENT '最后一次登录ip',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(10) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(10) DEFAULT NULL COMMENT '软删除',
  PRIMARY KEY (`id`,`phone`,`uid`) USING BTREE,
  UNIQUE KEY `id` (`id`) USING BTREE,
  UNIQUE KEY `uid` (`uid`) USING BTREE,
  UNIQUE KEY `phone` (`phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户表';

-- ----------------------------
-- Records of p_user
-- ----------------------------
BEGIN;
INSERT INTO `p_user` VALUES (1, '196024', '13885578655', '5c92996bf55ad6876e70a042cabd5fcb', 0, 0, '这个是测试', 4, 9990, '192.168.0.2', '192.168.0.2', 1590386444, 1591843266, NULL);
INSERT INTO `p_user` VALUES (2, '196025', '13885578651', '522af2533f56ae028c5a49b8a0d5401d', 0, 0, '测试2', 5, 1098, '192.168.0.2', '192.168.0.2', 1590995983, 1591960512, NULL);
INSERT INTO `p_user` VALUES (3, '196026', '18159850873', '2186b3c4cb33fb4177a73212bd40fd79', 0, 0, '测试3', 2, 9976, '192.168.0.2', '192.168.0.2', 1591869438, 1591869438, NULL);
COMMIT;

-- ----------------------------
-- Table structure for p_user_fund_log
-- ----------------------------
DROP TABLE IF EXISTS `p_user_fund_log`;
CREATE TABLE `p_user_fund_log` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
  `order_no` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单号',
  `deal_type` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '交易类型-后台定义',
  `deal_before` int(9) NOT NULL COMMENT '交易之前砖石',
  `deal_amount` int(9) NOT NULL COMMENT '交易砖石',
  `deal_after` int(9) NOT NULL COMMENT '交易之后砖石',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态 0-未审核 1-审核通过 2-拒绝审核',
  `remake` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(10) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(10) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`,`order_no`),
  UNIQUE KEY `id` (`id`) USING BTREE,
  UNIQUE KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户资金表';

-- ----------------------------
-- Records of p_user_fund_log
-- ----------------------------
BEGIN;
INSERT INTO `p_user_fund_log` VALUES (1, '196026', 'BT2020061305000917196026', 'OBL', 0, 5, 0, 1, '结算订单', 1591995609, 1591995609, NULL);
COMMIT;

-- ----------------------------
-- Table structure for p_user_grade
-- ----------------------------
DROP TABLE IF EXISTS `p_user_grade`;
CREATE TABLE `p_user_grade` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `tid` int(12) NOT NULL COMMENT '桌子id',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
  `innings` int(3) NOT NULL DEFAULT '1' COMMENT '局数(进行的第几局)',
  `win` int(9) NOT NULL DEFAULT '0' COMMENT '赢多少砖石(可为负数，负数为输)',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户战绩表';

-- ----------------------------
-- Records of p_user_grade
-- ----------------------------
BEGIN;
INSERT INTO `p_user_grade` VALUES (1, 126587, '196024', 1, 12, 1591995609);
INSERT INTO `p_user_grade` VALUES (2, 126587, '196026', 1, -5, 1591995609);
COMMIT;

-- ----------------------------
-- Table structure for p_user_msg
-- ----------------------------
DROP TABLE IF EXISTS `p_user_msg`;
CREATE TABLE `p_user_msg` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
  `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息内容',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  `is_unread` tinyint(1) NOT NULL DEFAULT '1' COMMENT '未读邮件',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户消息表';

-- ----------------------------
-- Records of p_user_msg
-- ----------------------------
BEGIN;
INSERT INTO `p_user_msg` VALUES (7, '196024', '创建牌桌扣除3颗砖石', 1591025895, 0);
COMMIT;

-- ----------------------------
-- Table structure for p_user_room
-- ----------------------------
DROP TABLE IF EXISTS `p_user_room`;
CREATE TABLE `p_user_room` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `rid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间号-6位随机数',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
  `name` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间名',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '房间状态 0-正常 1-关闭',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(10) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(10) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`,`rid`,`uid`,`name`),
  UNIQUE KEY `id` (`id`) USING BTREE,
  UNIQUE KEY `rid` (`rid`) USING BTREE,
  UNIQUE KEY `uid` (`uid`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户房间';

-- ----------------------------
-- Records of p_user_room
-- ----------------------------
BEGIN;
INSERT INTO `p_user_room` VALUES (1, '395550', '196024', '测试', 0, 1590994307, 1590994307, NULL);
INSERT INTO `p_user_room` VALUES (2, '395551', '196025', '测试2', 0, 1590995995, 1590995995, NULL);
COMMIT;

-- ----------------------------
-- Table structure for p_user_room_table
-- ----------------------------
DROP TABLE IF EXISTS `p_user_room_table`;
CREATE TABLE `p_user_room_table` (
  `id` int(12) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `rid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间id',
  `uid` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建的用户id(创建者)',
  `min_balance` int(9) NOT NULL DEFAULT '0' COMMENT '最低进入房间余额',
  `number` int(1) NOT NULL DEFAULT '0' COMMENT '房间人数',
  `is_send_text` tinyint(1) NOT NULL DEFAULT '1' COMMENT '发送文字 1-可以 0-不可以',
  `is_send_voice` tinyint(1) NOT NULL COMMENT '发送语音 1-可以 0-不可以',
  `low_grade` int(9) NOT NULL COMMENT '低分(下注低砖)',
  `innings` int(3) NOT NULL DEFAULT '6' COMMENT '桌子局数(到这个局数之后自动回收)',
  `create_time` int(10) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(10) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(10) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=126590 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户房间的桌子';

-- ----------------------------
-- Records of p_user_room_table
-- ----------------------------
BEGIN;
INSERT INTO `p_user_room_table` VALUES (3, '395550', '196024', 10, 5, 1, 0, 10, 8, 1591022905, 1591022905, NULL);
INSERT INTO `p_user_room_table` VALUES (4, '395550', '196024', 10, 5, 1, 0, 10, 8, 1591022905, 1591022905, NULL);
INSERT INTO `p_user_room_table` VALUES (5, '395550', '196024', 10, 5, 1, 0, 10, 8, 1591022905, 1591022905, NULL);
INSERT INTO `p_user_room_table` VALUES (126587, '395550', '196024', 10, 5, 1, 0, 1, 8, 1591025354, 1591025354, NULL);
INSERT INTO `p_user_room_table` VALUES (126588, '395550', '196024', 1, 3, 1, 0, 10, 8, 1591025573, 1591025573, NULL);
INSERT INTO `p_user_room_table` VALUES (126589, '395550', '196024', 100, 5, 1, 0, 10, 8, 1591025895, 1591025895, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
